var pg=require('pg')
var connection=pg.createConnection({   //用一个变量记录mysql
    host:'eachma.com',
    user:'postgres',
    password:'l9yus5nn',
    database:'pam_db'
})
exports.query=function(){
    //mysql
    //connection.connect()
    var args = arguments
    if(args.length==2){
        connection.query(args[0],function(err,r){
            args[1](err,r)
        })
    }else if(args.length==3){
        connection.query(args[0],args[1],function(err,r){
            args[2](err,r)
        })
    }
    //connection.end()
}